export const day01_02 = () => {
    const list = [
        { id: 1001, name: 'vue' },
        { id: 1002, name: 'react' },
        { id: 1003, name: 'angular' },
    ]
    return (
        <div>
            <h3>02_实现列表渲染</h3>
            <ul>
                {/* map循环list return结构 */}
                {/* 注: 加上独一无二的key 字符串或者number id => react框架内部使用 提升更新性能 */}
                {list.map(item => (
                    <li key={item.id}>{item.name}</li>
                ))}
            </ul>
        </div>
    )
}
